﻿using System;
using System.Collections.Generic;

namespace YJ.Data.Interface
{
    public interface IShortMessage
    {
        /// <summary>
        /// 新增
        /// </summary>
        int Add(YJ.Data.Model.ShortMessage model);

        /// <summary>
        /// 更新
        /// </summary>
        int Update(YJ.Data.Model.ShortMessage model);

        /// <summary>
        /// 查询所有记录
        /// </summary>
        List<YJ.Data.Model.ShortMessage> GetAll();

        /// <summary>
        /// 查询单条记录
        /// </summary>
        Model.ShortMessage Get(Guid id);

        /// <summary>
        /// 根据主键查询一条已读记录
        /// </summary>
        YJ.Data.Model.ShortMessage GetRead(Guid id);

        /// <summary>
        /// 删除
        /// </summary>
        int Delete(Guid id);

        /// <summary>
        /// 查询记录条数
        /// </summary>
        long GetCount();

        /// <summary>
        /// 查询所有未读记录
        /// </summary>
        List<YJ.Data.Model.ShortMessage> GetAllNoRead();
        /// <summary>
        /// 查询一个人员未读记录
        /// </summary>
        List<YJ.Data.Model.ShortMessage> GetAllNoReadByUserID(Guid userID);

        int UpdateStatus(Guid id);

        List<YJ.Data.Model.ShortMessage> GetList(out string pager, int[] status, string query = "", string title = "", string contents = "", string senderID = "", string date1 = "", string date2 = "", string receiveID="");

        List<YJ.Data.Model.ShortMessage> GetList(out long count, int[] status, int size , int number, string title = "", string contents = "", string senderID = "", string date1 = "", string date2 = "", string receiveID = "", string order = "");
        List<YJ.Data.Model.ShortMessage> GetList(int[] status,string title = "", string contents = "", string senderID = "", string date1 = "", string date2 = "", string receiveID = "", string order = "");

        /// <summary>
        /// 删除记录
        /// </summary>
        int Delete(string linkID, int Type);
    }
}
